﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MyMainSite.Models
{
    public partial class BlogEntry
    {
        #region Public Properties

        public string BodyIntroHtml
        {
            get
            {
                return this.GetBodyIntro();
            }
        }

        #endregion

        #region Private Methods

        private string GetBodyIntro()
        {
            int i = this.BodyHtml.IndexOf("</p>");

            string firstPara = this.BodyHtml.Substring(0, i + "</p>".Length);

            return firstPara;
        }

        #endregion
    }
}